using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Data.Linq;

namespace Soussous.DAO.Connection
{
    class SQLConnection : AbstractConnection
    {
        private DataContext cnx;

        
        public SQLConnection()
            :
            base(null, null, null, null)
        {

        }


        // database connection
        protected override DataContext connectInternal()
        {
            try
            {
                cnx = new DataContext(@"Data Source=DOUDI\SQLEXPRESS;Initial Catalog=soussous;Integrated Security=True");
                //cnx = new DataContext(@"C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\soussous.mdf");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            return cnx;
        }
    }
}
